home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / ConditionalMacros.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  42.0 KB  |  1,333 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        ConditionalMacros.h
  3.  
  4.      Contains:    Set up for compiler independent conditionals
  5.  
  6.      Version:    Technology:    Universal Interface Files 3.1
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1993-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __CONDITIONALMACROS__
  19. #define __CONDITIONALMACROS__
  20.  
  21. /****************************************************************************************************
  22.     UNIVERSAL_INTERFACES_VERSION
  23.     
  24.         0x0310 => version 3.1
  25.         0x0301 => version 3.0.1
  26.         0x0300 => version 3.0
  27.         0x0210 => version 2.1
  28.         This conditional did not exist prior to version 2.1
  29. ****************************************************************************************************/
  30. #define UNIVERSAL_INTERFACES_VERSION 0x0310
  31.  
  32. /****************************************************************************************************
  33.  
  34.     TARGET_CPU_≈    
  35.     These conditionals specify which microprocessor instruction set is being
  36.     generated.  At most one of these is true, the rest are false.
  37.  
  38.         TARGET_CPU_PPC            - Compiler is generating PowerPC instructions
  39.         TARGET_CPU_68K            - Compiler is generating 680x0 instructions
  40.         TARGET_CPU_X86            - Compiler is generating x86 instructions
  41.         TARGET_CPU_MIPS            - Compiler is generating MIPS instructions
  42.         TARGET_CPU_SPARC        - Compiler is generating Sparc instructions
  43.         TARGET_CPU_ALPHA        - Compiler is generating Dec Alpha instructions
  44.  
  45.  
  46.     TARGET_OS_≈    
  47.     These conditionals specify in which Operating System the generated code will
  48.     run. At most one of the these is true, the rest are false.
  49.  
  50.         TARGET_OS_MAC            - Generate code will run under Mac OS
  51.         TARGET_OS_WIN32            - Generate code will run under 32-bit Windows
  52.         TARGET_OS_UNIX            - Generate code will run under some unix 
  53.  
  54.  
  55.     TARGET_RT_≈    
  56.     These conditionals specify in which runtime the generated code will
  57.     run. This is needed when the OS and CPU support more than one runtime
  58.     (e.g. MacOS on 68K supports CFM68K and Classic 68k).
  59.  
  60.         TARGET_RT_LITTLE_ENDIAN    - Generated code uses little endian format for integers
  61.         TARGET_RT_BIG_ENDIAN    - Generated code uses big endian format for integers     
  62.         TARGET_RT_MAC_CFM        - TARGET_OS_MAC is true and CFM68K or PowerPC CFM being used    
  63.         TARGET_RT_MAC_68881        - TARGET_OS_MAC is true and 68881 floating point instructions used    
  64.  
  65.  
  66.     PRAGMA_≈
  67.     These conditionals specify whether the compiler supports particular #pragma's
  68.     
  69.         PRAGMA_IMPORT             - Compiler supports: #pragma import on/off/reset
  70.         PRAGMA_ONCE              - Compiler supports: #pragma once
  71.         PRAGMA_STRUCT_ALIGN      - Compiler supports: #pragma options align=mac68k/power/reset
  72.         PRAGMA_STRUCT_PACK        - Compiler supports: #pragma pack(n)
  73.         PRAGMA_STRUCT_PACKPUSH    - Compiler supports: #pragma pack(push, n)/pack(pop)
  74.         PRAGMA_ENUM_PACK         - Compiler supports: #pragma options(!pack_enums)
  75.         PRAGMA_ENUM_ALWAYSINT     - Compiler supports: #pragma enumsalwaysint on/off/reset
  76.         PRAGMA_ENUM_OPTIONS        - Compiler supports: #pragma options enum=int/small/reset
  77.  
  78.     FOUR_CHAR_CODE
  79.     This conditional does the proper byte swapping to assue that a four character code (e.g. 'TEXT')
  80.     is compiled down to the correct value on all compilers.
  81.  
  82.         FOUR_CHAR_CODE('abcd')    - Convert a four-char-code to the correct 32-bit value
  83.  
  84.     TYPE_≈
  85.     These conditionals specify whether the compiler supports particular types.
  86.  
  87.         TYPE_LONGLONG            - Compiler supports "long long" 64-bit integers
  88.         TYPE_BOOL                - Compiler supports "bool"
  89.         TYPE_EXTENDED            - Compiler supports "extended" 80/96 bit floating point
  90.  
  91. ****************************************************************************************************/
  92.  
  93. #if defined(__MRC__)
  94.     /*
  95.         MrC[pp] compiler from Apple Computer, Inc.
  96.     */
  97.     #define TARGET_CPU_PPC              1
  98.     #define TARGET_CPU_68K              0
  99.     #define TARGET_CPU_X86              0
  100.     #define TARGET_CPU_MIPS             0
  101.     #define TARGET_CPU_SPARC            0        
  102.     #define TARGET_CPU_ALPHA            0
  103.     #define TARGET_OS_MAC                1
  104.     #define TARGET_OS_WIN32                0
  105.     #define TARGET_OS_UNIX                0
  106.     #define TARGET_RT_LITTLE_ENDIAN        0
  107.     #define TARGET_RT_BIG_ENDIAN        1
  108.     #define TARGET_RT_MAC_CFM            1
  109.     #define TARGET_RT_MAC_68881            0
  110.     #if (__MRC__  > 0x0200) && (__MRC__ < 0x0700)
  111.         #define PRAGMA_IMPORT            1
  112.     #else
  113.         #define PRAGMA_IMPORT            0
  114.     #endif
  115.     #define PRAGMA_STRUCT_ALIGN            1
  116.     #define PRAGMA_ONCE                    1
  117.     #define PRAGMA_STRUCT_PACK            0
  118.     #define PRAGMA_STRUCT_PACKPUSH        0
  119.     #define PRAGMA_ENUM_PACK            1
  120.     #define PRAGMA_ENUM_ALWAYSINT        0
  121.     #define PRAGMA_ENUM_OPTIONS            0
  122.     #define FOUR_CHAR_CODE(x)            (x)
  123.         
  124.     #if (__MRC__  > 0x0300) && (__MRC__ < 0x0700)
  125.         #if __option(longlong)
  126.             #define TYPE_LONGLONG        1
  127.         #else
  128.             #define TYPE_LONGLONG        0
  129.         #endif
  130.         #if __option(bool)
  131.             #define TYPE_BOOL            1
  132.         #else
  133.             #define TYPE_BOOL            0
  134.         #endif
  135.     #else
  136.         #define TYPE_LONGLONG            0
  137.         #define TYPE_BOOL                0
  138.     #endif
  139.     #define TYPE_EXTENDED                0
  140.     
  141.  
  142.  
  143. #elif defined(__SC__) && (defined(MPW_CPLUS) || defined(MPW_C))
  144.     /*
  145.         SC[pp] compiler from Apple Computer, Inc.
  146.     */
  147.     #define TARGET_CPU_PPC              0
  148.     #define TARGET_CPU_68K              1
  149.     #define TARGET_CPU_X86              0
  150.     #define TARGET_CPU_MIPS             0
  151.     #define TARGET_CPU_SPARC            0        
  152.     #define TARGET_CPU_ALPHA            0
  153.     #define TARGET_OS_MAC                1
  154.     #define TARGET_OS_WIN32                0
  155.     #define TARGET_OS_UNIX                0
  156.     #define TARGET_RT_LITTLE_ENDIAN        0
  157.     #define TARGET_RT_BIG_ENDIAN        1
  158.     #if defined(__CFM68K__)
  159.         #define TARGET_RT_MAC_CFM        1
  160.     #else
  161.         #define TARGET_RT_MAC_CFM        0
  162.     #endif
  163.     #if defined(mc68881)
  164.         #define TARGET_RT_MAC_68881        1
  165.     #else
  166.         #define TARGET_RT_MAC_68881        0
  167.     #endif
  168.     #if TARGET_RT_MAC_CFM 
  169.         #define PRAGMA_IMPORT            1
  170.         #if (__SC__ <= 0x0810)
  171.             /* old versions of SC don't support “#pragma import reset” */
  172.             #define PRAGMA_IMPORT_OFF    1
  173.         #endif
  174.     #else
  175.         #define PRAGMA_IMPORT            0
  176.     #endif
  177.     #define PRAGMA_STRUCT_ALIGN            0
  178.     #define PRAGMA_ONCE                    0
  179.     #define PRAGMA_STRUCT_PACK            0
  180.     #define PRAGMA_STRUCT_PACKPUSH        0
  181.     #define PRAGMA_ENUM_PACK            1
  182.     #define PRAGMA_ENUM_ALWAYSINT        0
  183.     #define PRAGMA_ENUM_OPTIONS            0
  184.     #define FOUR_CHAR_CODE(x)            (x)
  185.     
  186.     #define TYPE_LONGLONG                0
  187.     #define TYPE_EXTENDED                1
  188.     #if (__SC__  > 0x0810)
  189.         #if __option(bool)
  190.             #define TYPE_BOOL            1
  191.         #else
  192.             #define TYPE_BOOL            0
  193.         #endif
  194.     #else
  195.         #define TYPE_BOOL                0
  196.     #endif
  197.         
  198.  
  199.  
  200. #elif defined(__MWERKS__)
  201.     /*
  202.         CodeWarrior compiler from Metrowerks, Inc.
  203.     */
  204.     #if (__MWERKS__ < 0x0900) || macintosh
  205.         #define TARGET_OS_MAC                1
  206.         #define TARGET_OS_WIN32                0
  207.         #define TARGET_OS_UNIX                0
  208.         #define TARGET_CPU_X86              0
  209.         #define TARGET_CPU_MIPS             0
  210.         #define TARGET_CPU_SPARC            0        
  211.         #define TARGET_CPU_ALPHA            0
  212.         #define TARGET_RT_LITTLE_ENDIAN        0
  213.         #define TARGET_RT_BIG_ENDIAN        1
  214.         #if powerc
  215.             #define TARGET_CPU_PPC          1
  216.             #define TARGET_CPU_68K          0
  217.             #define TARGET_RT_MAC_CFM        1
  218.             #define TARGET_RT_MAC_68881        0
  219.         #else
  220.             #define TARGET_CPU_PPC          0
  221.             #define TARGET_CPU_68K          1
  222.             #if defined(__CFM68K__)
  223.                 #define TARGET_RT_MAC_CFM    1
  224.             #else
  225.                 #define TARGET_RT_MAC_CFM    0
  226.             #endif
  227.             #if __MC68881__
  228.                 #define TARGET_RT_MAC_68881    1
  229.             #else
  230.                 #define TARGET_RT_MAC_68881    0
  231.             #endif
  232.         #endif
  233.         #define PRAGMA_ONCE                    1
  234.         #if (__MWERKS__ >= 0x0700)
  235.             #define PRAGMA_IMPORT            TARGET_RT_MAC_CFM
  236.         #else
  237.             #define PRAGMA_IMPORT            0
  238.         #endif
  239.         #define PRAGMA_STRUCT_ALIGN            1
  240.         #define PRAGMA_STRUCT_PACK            0
  241.         #define PRAGMA_STRUCT_PACKPUSH        0
  242.         #define PRAGMA_ENUM_PACK            0
  243.         #define PRAGMA_ENUM_ALWAYSINT        1
  244.         #define PRAGMA_ENUM_OPTIONS            0
  245.         #define FOUR_CHAR_CODE(x)            (x)
  246.  
  247.     
  248.     #elif (__MWERKS__ >= 0x0900) && __INTEL__
  249.         #define TARGET_CPU_PPC              0
  250.         #define TARGET_CPU_68K              0
  251.         #define TARGET_CPU_X86              1
  252.         #define TARGET_CPU_MIPS             0
  253.         #define TARGET_CPU_SPARC            0        
  254.         #define TARGET_CPU_ALPHA            0
  255.         #define TARGET_OS_MAC                0
  256.         #define TARGET_OS_WIN32                1
  257.         #define TARGET_OS_UNIX                0
  258.         #define TARGET_RT_LITTLE_ENDIAN        1
  259.         #define TARGET_RT_BIG_ENDIAN        0
  260.         #define TARGET_RT_MAC_CFM            0
  261.         #define TARGET_RT_MAC_68881            0
  262.         #define PRAGMA_ONCE                    1
  263.         #define PRAGMA_IMPORT                0
  264.         #define PRAGMA_STRUCT_ALIGN            0
  265.         #define PRAGMA_STRUCT_PACK            1
  266.         #define PRAGMA_STRUCT_PACKPUSH        1
  267.         #define PRAGMA_ENUM_PACK            0
  268.         #define PRAGMA_ENUM_ALWAYSINT        1
  269.         #define PRAGMA_ENUM_OPTIONS            0
  270.         #define FOUR_CHAR_CODE(x)            (x)
  271.  
  272.  
  273.     #elif (__MWERKS__ >= 0x1900) && __MIPS__
  274.         #define TARGET_CPU_PPC              0
  275.         #define TARGET_CPU_68K              0
  276.         #define TARGET_CPU_X86              0
  277.         #define TARGET_CPU_MIPS             1
  278.         #define TARGET_CPU_SPARC            0        
  279.         #define TARGET_CPU_ALPHA            0
  280.         #define TARGET_OS_MAC                0
  281.         #define TARGET_OS_WIN32                0
  282.         #define TARGET_OS_UNIX                1
  283.         #if __option(little_endian)
  284.             #define TARGET_RT_LITTLE_ENDIAN    1
  285.             #define TARGET_RT_BIG_ENDIAN    0
  286.         #else
  287.             #define TARGET_RT_LITTLE_ENDIAN    0
  288.             #define TARGET_RT_BIG_ENDIAN    1
  289.         #endif
  290.         #define TARGET_RT_MAC_CFM            0
  291.         #define TARGET_RT_MAC_68881            0
  292.         #define PRAGMA_ONCE                    1
  293.         #define PRAGMA_IMPORT                0
  294.         #define PRAGMA_STRUCT_ALIGN            0
  295.         #define PRAGMA_STRUCT_PACK            1
  296.         #define PRAGMA_STRUCT_PACKPUSH        0
  297.         #define PRAGMA_ENUM_PACK            0
  298.         #define PRAGMA_ENUM_ALWAYSINT        1
  299.         #define PRAGMA_ENUM_OPTIONS            0
  300.         #define FOUR_CHAR_CODE(x)            (x)
  301.     
  302.     #else    
  303.         #error unknown Metrowerks compiler
  304.     #endif
  305.  
  306.  
  307.     #if (__MWERKS__ >= 0x1100)
  308.         #if __option(longlong)
  309.             #define TYPE_LONGLONG        1
  310.         #else
  311.             #define TYPE_LONGLONG        0
  312.         #endif
  313.     #else
  314.         #define TYPE_LONGLONG            0
  315.     #endif
  316.     #if (__MWERKS__ >= 0x1000)
  317.         #if __option(bool)
  318.             #define TYPE_BOOL            1
  319.         #else
  320.             #define TYPE_BOOL            0
  321.         #endif
  322.     #else
  323.         #define TYPE_BOOL                0
  324.     #endif
  325.  
  326.     #if TARGET_OS_MAC && TARGET_CPU_68K
  327.         typedef long double extended;
  328.         #define TYPE_EXTENDED            1
  329.     #else
  330.         #define TYPE_EXTENDED            0
  331.     #endif
  332.  
  333.  
  334.  
  335. #elif defined(SYMANTEC_CPLUS) || defined(SYMANTEC_C)
  336.     /*
  337.         C and C++ compiler from Symantec, Inc.
  338.     */
  339.     #define TARGET_OS_MAC                1
  340.     #define TARGET_OS_WIN32                0
  341.     #define TARGET_OS_UNIX                0
  342.     #define TARGET_CPU_X86              0
  343.     #define TARGET_CPU_MIPS             0
  344.     #define TARGET_CPU_SPARC            0        
  345.     #define TARGET_CPU_ALPHA            0
  346.     #define TARGET_RT_LITTLE_ENDIAN        0
  347.     #define TARGET_RT_BIG_ENDIAN        1
  348.     #if powerc
  349.         #define TARGET_CPU_PPC          1
  350.         #define TARGET_CPU_68K          0
  351.         #define TARGET_RT_MAC_CFM        1
  352.         #define TARGET_RT_MAC_68881        0
  353.     #else
  354.         #define TARGET_CPU_PPC          0
  355.         #define TARGET_CPU_68K          1
  356.         #if defined(__CFM68K)
  357.             #define TARGET_RT_MAC_CFM    1
  358.         #else
  359.             #define TARGET_RT_MAC_CFM    0
  360.         #endif
  361.         #if mc68881
  362.             #define TARGET_RT_MAC_68881    1
  363.         #else
  364.             #define TARGET_RT_MAC_68881    0
  365.         #endif
  366.     #endif
  367.     #define PRAGMA_IMPORT                0
  368.     #define PRAGMA_ONCE                    1
  369.     #define PRAGMA_STRUCT_ALIGN            1
  370.     #define PRAGMA_STRUCT_PACK            0
  371.     #define PRAGMA_STRUCT_PACKPUSH        0
  372.     #define PRAGMA_ENUM_PACK            1
  373.     #define PRAGMA_ENUM_ALWAYSINT        0
  374.     #define PRAGMA_ENUM_OPTIONS            0
  375.     #define FOUR_CHAR_CODE(x)            (x)
  376.     
  377.     #if __useAppleExts__
  378.         #define TYPE_EXTENDED            1
  379.     #else
  380.         #define TYPE_EXTENDED            0
  381.     #endif
  382.     #define TYPE_LONGLONG                0
  383.     #define TYPE_BOOL                    0
  384.     
  385.  
  386.  
  387. #elif defined(THINK_C)
  388.     /*
  389.         THINK C compiler from Symantec, Inc.        << WARNING: Unsupported Compiler >>
  390.     */
  391.     #define TARGET_CPU_PPC              0
  392.     #define TARGET_CPU_68K              1
  393.     #define TARGET_CPU_X86              0
  394.     #define TARGET_CPU_MIPS             0
  395.     #define TARGET_CPU_SPARC            0        
  396.     #define TARGET_CPU_ALPHA            0
  397.     #define TARGET_OS_MAC                1
  398.     #define TARGET_OS_WIN32                0
  399.     #define TARGET_OS_UNIX                0
  400.     #define TARGET_RT_LITTLE_ENDIAN        0
  401.     #define TARGET_RT_BIG_ENDIAN        1
  402.     #define TARGET_RT_MAC_CFM            0
  403.     #if defined(mc68881)
  404.         #define TARGET_RT_MAC_68881        1
  405.     #else
  406.         #define TARGET_RT_MAC_68881        0
  407.     #endif
  408.     #define PRAGMA_IMPORT                0
  409.     #define PRAGMA_STRUCT_ALIGN            0
  410.     #define PRAGMA_ONCE                    1
  411.     #define PRAGMA_STRUCT_PACK            0
  412.     #define PRAGMA_STRUCT_PACKPUSH        0
  413.     #define PRAGMA_ENUM_PACK            1
  414.     #define PRAGMA_ENUM_ALWAYSINT        0
  415.     #define PRAGMA_ENUM_OPTIONS            0
  416.     #define FOUR_CHAR_CODE(x)            (x)
  417.     
  418.     #define TYPE_EXTENDED                1
  419.     #define TYPE_LONGLONG                0
  420.     #define TYPE_BOOL                    0
  421.     
  422.  
  423.  
  424. #elif defined(__PPCC__)
  425.     /*
  426.         PPCC compiler from Apple Computer, Inc.        << WARNING: Unsupported Compiler >>
  427.     */
  428.     #define TARGET_CPU_PPC              1
  429.     #define TARGET_CPU_68K              0
  430.     #define TARGET_CPU_X86              0
  431.     #define TARGET_CPU_MIPS             0
  432.     #define TARGET_CPU_SPARC            0        
  433.     #define TARGET_CPU_ALPHA            0
  434.     #define TARGET_OS_MAC                1
  435.     #define TARGET_OS_WIN32                0
  436.     #define TARGET_OS_UNIX                0
  437.     #define TARGET_RT_LITTLE_ENDIAN        0
  438.     #define TARGET_RT_BIG_ENDIAN        1
  439.     #define TARGET_RT_MAC_CFM            1
  440.     #define TARGET_RT_MAC_68881            0
  441.     #define PRAGMA_IMPORT                0
  442.     #define PRAGMA_STRUCT_ALIGN            1
  443.     #define PRAGMA_ONCE                    0
  444.     #define PRAGMA_STRUCT_PACK            0
  445.     #define PRAGMA_STRUCT_PACKPUSH        0
  446.     #define PRAGMA_ENUM_PACK            0
  447.     #define PRAGMA_ENUM_ALWAYSINT        0
  448.     #define PRAGMA_ENUM_OPTIONS            0
  449.     #define FOUR_CHAR_CODE(x)            (x)
  450.     
  451.     #define TYPE_EXTENDED                0
  452.     #define TYPE_LONGLONG                0
  453.     #define TYPE_BOOL                    0
  454.  
  455.  
  456. #elif defined(applec) && !defined(__SC__)
  457.     /*
  458.         MPW C compiler from Apple Computer, Inc.    << WARNING: Unsupported Compiler >>
  459.     */
  460.     #define TARGET_CPU_PPC              0
  461.     #define TARGET_CPU_68K              1
  462.     #define TARGET_CPU_X86              0
  463.     #define TARGET_CPU_MIPS             0
  464.     #define TARGET_CPU_SPARC            0        
  465.     #define TARGET_CPU_ALPHA            0
  466.     #define TARGET_OS_MAC                1
  467.     #define TARGET_OS_WIN32                0
  468.     #define TARGET_OS_UNIX                0
  469.     #define TARGET_RT_LITTLE_ENDIAN        0
  470.     #define TARGET_RT_BIG_ENDIAN        1
  471.     #define TARGET_RT_MAC_CFM            0
  472.     #if defined(mc68881)
  473.         #define TARGET_RT_MAC_68881        1
  474.     #else
  475.         #define TARGET_RT_MAC_68881        0
  476.     #endif
  477.     #define PRAGMA_IMPORT                0
  478.     #define PRAGMA_STRUCT_ALIGN            0
  479.     #define PRAGMA_ONCE                    0
  480.     #define PRAGMA_STRUCT_PACK            0
  481.     #define PRAGMA_STRUCT_PACKPUSH        0
  482.     #define PRAGMA_ENUM_PACK            0
  483.     #define PRAGMA_ENUM_ALWAYSINT        0
  484.     #define PRAGMA_ENUM_OPTIONS            0
  485.     /* Note: MPW C 3.2 had a bug where MACRO('xx   ') would cause 'xx  ' to be misevaluated */
  486.     #define FOUR_CHAR_CODE                
  487.  
  488.     #define TYPE_EXTENDED                1
  489.     #define TYPE_LONGLONG                0
  490.     #define TYPE_BOOL                    0
  491.  
  492.  
  493.  
  494. #elif defined(__GNUC__) && (defined(__APPLE_CPP__) || defined(__NEXT_CPP__))
  495.     /*
  496.         gcc from Next, Inc., with cpp-precomp (header precompiler)
  497.     */
  498.     #if defined(powerpc) || defined(ppc)
  499.         #define TARGET_CPU_PPC            1
  500.         #define TARGET_CPU_68K            0
  501.         #define TARGET_CPU_X86            0
  502.         #define TARGET_CPU_MIPS            0
  503.         #define TARGET_CPU_SPARC        0   
  504.         #define TARGET_CPU_ALPHA        0
  505.         #define TARGET_RT_MAC_CFM        0
  506.         #define TARGET_RT_MAC_68881        0
  507.         #define TARGET_RT_LITTLE_ENDIAN    0
  508.         #define TARGET_RT_BIG_ENDIAN    1
  509.     #elif defined(m68k)
  510.         #define TARGET_CPU_PPC            0
  511.         #define TARGET_CPU_68K            1
  512.         #define TARGET_CPU_X86            0
  513.         #define TARGET_CPU_MIPS            0
  514.         #define TARGET_CPU_SPARC        0   
  515.         #define TARGET_CPU_ALPHA        0
  516.         #define TARGET_RT_MAC_CFM        0
  517.         #define TARGET_RT_MAC_68881        0
  518.         #define TARGET_RT_LITTLE_ENDIAN 0
  519.         #define TARGET_RT_BIG_ENDIAN    1
  520.     #elif defined(sparc)
  521.         #define TARGET_CPU_PPC            0
  522.         #define TARGET_CPU_68K            0
  523.         #define TARGET_CPU_X86            0
  524.         #define TARGET_CPU_MIPS            0
  525.         #define TARGET_CPU_SPARC        1
  526.         #define TARGET_CPU_ALPHA        0
  527.         #define TARGET_RT_MAC_CFM        0
  528.         #define TARGET_RT_MAC_68881        0
  529.         #define TARGET_RT_LITTLE_ENDIAN    0
  530.         #define TARGET_RT_BIG_ENDIAN    1
  531.     #elif defined(i386) || defined(intel)
  532.         #define TARGET_CPU_PPC            0
  533.         #define TARGET_CPU_68K            0
  534.         #define TARGET_CPU_X86            1
  535.         #define TARGET_CPU_MIPS            0
  536.         #define TARGET_CPU_SPARC        0
  537.         #define TARGET_CPU_ALPHA        0
  538.         #define TARGET_RT_MAC_CFM        0
  539.         #define TARGET_RT_MAC_68881        0
  540.         #define TARGET_RT_LITTLE_ENDIAN    1
  541.         #define TARGET_RT_BIG_ENDIAN    0
  542.     #else
  543.         #error unrecognized NeXT GNU C compiler
  544.     #endif
  545.  
  546.  
  547.     #define TARGET_OS_MAC                0
  548.     #define TARGET_OS_WIN32                0
  549.     #define TARGET_OS_UNIX                1
  550.     #define PRAGMA_IMPORT                0
  551.     #define PRAGMA_STRUCT_ALIGN            1
  552.     #define PRAGMA_ONCE                    0
  553.     #define PRAGMA_STRUCT_PACK            0
  554.     #define PRAGMA_STRUCT_PACKPUSH        0
  555.     #define PRAGMA_ENUM_PACK            0
  556.     #define PRAGMA_ENUM_ALWAYSINT        0
  557.     #define PRAGMA_ENUM_OPTIONS            0
  558.     #define FOUR_CHAR_CODE(x)            (x)
  559.  
  560.     #define TYPE_EXTENDED                0
  561.     #ifdef _LONG_LONG
  562.         #define TYPE_LONGLONG            1
  563.     #else
  564.         #define TYPE_LONGLONG            0
  565.     #endif
  566.     #define TYPE_BOOL                    0
  567.  
  568.  
  569. #elif defined(__GNUC__)
  570.     /*
  571.         gC for MPW from Free Software Foundation, Inc.
  572.     */
  573.     #if #cpu(powerpc)
  574.         #define TARGET_CPU_PPC          1
  575.         #define TARGET_CPU_68K          0
  576.         #define TARGET_CPU_X86          0
  577.         #define TARGET_CPU_MIPS         0
  578.         #define TARGET_CPU_SPARC        0    
  579.         #define TARGET_CPU_ALPHA        0
  580.         #define TARGET_RT_MAC_CFM        1
  581.         #define TARGET_RT_MAC_68881        0
  582.     #elif #cpu(m68k)
  583.         #define TARGET_CPU_PPC          0
  584.         #define TARGET_CPU_68K          1
  585.         #define TARGET_CPU_X86          0
  586.         #define TARGET_CPU_MIPS         0
  587.         #define TARGET_CPU_SPARC        0    
  588.         #define TARGET_CPU_ALPHA        0
  589.         #define TARGET_RT_MAC_CFM        0
  590.         #define TARGET_RT_MAC_68881        0
  591.     #else
  592.         #error unsupported GNU C compiler
  593.     #endif
  594.     
  595.     #if #system(macos)
  596.         #define TARGET_OS_MAC            1
  597.         #define TARGET_OS_WIN32            0
  598.         #define TARGET_OS_UNIX            0
  599.     #elif #system(unix)
  600.         #define TARGET_OS_MAC            0
  601.         #define TARGET_OS_WIN32            0
  602.         #define TARGET_OS_UNIX            1
  603.     #else
  604.         #error unsupported GNU C compiler
  605.     #endif
  606.     
  607.     #define TARGET_RT_LITTLE_ENDIAN        0
  608.     #define TARGET_RT_BIG_ENDIAN        1
  609.     #define PRAGMA_IMPORT                0
  610.     #define PRAGMA_STRUCT_ALIGN            1
  611.     #define PRAGMA_ONCE                    0
  612.     #define PRAGMA_STRUCT_PACK            0
  613.     #define PRAGMA_STRUCT_PACKPUSH        0
  614.     #define PRAGMA_ENUM_PACK            0
  615.     #define PRAGMA_ENUM_ALWAYSINT        0
  616.     #define PRAGMA_ENUM_OPTIONS            0
  617.     #define FOUR_CHAR_CODE(x)            (x)
  618.  
  619.     #define TYPE_EXTENDED                0
  620.     #ifdef _LONG_LONG
  621.         #define TYPE_LONGLONG            1
  622.     #else
  623.         #define TYPE_LONGLONG            0
  624.     #endif
  625.     #define TYPE_BOOL                    0
  626.  
  627.  
  628.  
  629. #elif defined(__xlc) || defined(__xlC) || defined(__xlC__) || defined(__XLC121__)
  630.     /*
  631.         xlc and xlC on RS/6000 from IBM, Inc.
  632.     */
  633.     #define TARGET_CPU_PPC              1
  634.     #define TARGET_CPU_68K              0
  635.     #define TARGET_CPU_X86              0
  636.     #define TARGET_CPU_MIPS             0
  637.     #define TARGET_CPU_SPARC            0        
  638.     #define TARGET_CPU_ALPHA            0
  639.     #if defined(_AIX)
  640.         #define TARGET_OS_MAC            0
  641.         #define TARGET_OS_UNIX            1
  642.     #else
  643.         #define TARGET_OS_MAC            1
  644.         #define TARGET_OS_UNIX            0
  645.     #endif
  646.     #define TARGET_OS_WIN32                0
  647.     #define TARGET_RT_LITTLE_ENDIAN        0
  648.     #define TARGET_RT_BIG_ENDIAN        1
  649.     #define TARGET_RT_MAC_CFM            1
  650.     #define TARGET_RT_MAC_68881            0
  651.     #define PRAGMA_IMPORT                0
  652.     #define PRAGMA_STRUCT_ALIGN            1
  653.     #define PRAGMA_ONCE                    0
  654.     #define PRAGMA_STRUCT_PACK            0
  655.     #define PRAGMA_STRUCT_PACKPUSH        0
  656.     #define PRAGMA_ENUM_PACK            0
  657.     #define PRAGMA_ENUM_ALWAYSINT        0
  658.     #define PRAGMA_ENUM_OPTIONS            1
  659.     #define FOUR_CHAR_CODE(x)            (x)
  660.  
  661.     #define TYPE_EXTENDED                0
  662.     #ifdef _LONG_LONG
  663.         #define TYPE_LONGLONG            1
  664.     #else
  665.         #define TYPE_LONGLONG            0
  666.     #endif
  667.     #define TYPE_BOOL                    0
  668.  
  669.  
  670. #elif defined(_MSC_VER) && !defined(__MWERKS__) 
  671.     /*
  672.         Visual C++ from Microsoft, Inc.
  673.     */
  674.     #if defined(_M_M68K)    /* Visual C++ with Macintosh 68K target */
  675.         #define TARGET_CPU_PPC              0
  676.         #define TARGET_CPU_68K              1
  677.         #define TARGET_CPU_X86              0
  678.         #define TARGET_CPU_MIPS             0
  679.         #define TARGET_CPU_SPARC            0
  680.         #define TARGET_CPU_ALPHA            0
  681.         #define TARGET_OS_MAC                1
  682.         #define TARGET_OS_WIN32                0
  683.         #define TARGET_OS_UNIX                0
  684.         #define TARGET_RT_LITTLE_ENDIAN        0
  685.         #define TARGET_RT_BIG_ENDIAN        1
  686.         #define TARGET_RT_MAC_CFM            0
  687.         #define TARGET_RT_MAC_68881            0
  688.         #define PRAGMA_IMPORT                0
  689.         #define PRAGMA_STRUCT_ALIGN            1
  690.         #define PRAGMA_ONCE                     0
  691.         #define PRAGMA_STRUCT_PACK            1
  692.         #define PRAGMA_STRUCT_PACKPUSH        1
  693.         #define PRAGMA_ENUM_PACK            0
  694.         #define PRAGMA_ENUM_ALWAYSINT        0
  695.         #define PRAGMA_ENUM_OPTIONS            0
  696.         #define FOUR_CHAR_CODE(x)            (x)
  697.         #define TYPE_EXTENDED                0
  698.         #define TYPE_LONGLONG                0
  699.         #define TYPE_BOOL                    0
  700.     #elif defined(_M_MPPC)    /* Visual C++ with Macintosh PowerPC target */
  701.         #define TARGET_CPU_PPC              1
  702.         #define TARGET_CPU_68K              0
  703.         #define TARGET_CPU_X86              0
  704.         #define TARGET_CPU_MIPS             0
  705.         #define TARGET_CPU_SPARC            0
  706.         #define TARGET_CPU_ALPHA            0
  707.         #define TARGET_OS_MAC                1
  708.         #define TARGET_OS_WIN32                0
  709.         #define TARGET_OS_UNIX                0
  710.         #define TARGET_RT_LITTLE_ENDIAN        0
  711.         #define TARGET_RT_BIG_ENDIAN        1
  712.         #define TARGET_RT_MAC_CFM            1
  713.         #define TARGET_RT_MAC_68881            0
  714.         #define PRAGMA_IMPORT                0
  715.         #define PRAGMA_STRUCT_ALIGN            1
  716.         #define PRAGMA_ONCE                     0
  717.         #define PRAGMA_STRUCT_PACK            1
  718.         #define PRAGMA_STRUCT_PACKPUSH        1
  719.         #define PRAGMA_ENUM_PACK            0
  720.         #define PRAGMA_ENUM_ALWAYSINT        0
  721.         #define PRAGMA_ENUM_OPTIONS            0
  722.         #define FOUR_CHAR_CODE(x)            (x)
  723.         #define TYPE_EXTENDED                0
  724.         #define TYPE_LONGLONG                0
  725.         #define TYPE_BOOL                    0
  726.  
  727.     #elif defined(_M_IX86)    /* Visual C++ with Intel x86 target */
  728.         #define TARGET_CPU_PPC              0
  729.         #define TARGET_CPU_68K              0
  730.         #define TARGET_CPU_X86              1
  731.         #define TARGET_CPU_MIPS             0
  732.         #define TARGET_CPU_SPARC            0
  733.         #define TARGET_CPU_ALPHA            0
  734.         #define TARGET_OS_MAC                0
  735.         #define TARGET_OS_WIN32                1
  736.         #define TARGET_OS_UNIX                0
  737.         #define TARGET_RT_LITTLE_ENDIAN        1
  738.         #define TARGET_RT_BIG_ENDIAN        0
  739.         #define TARGET_RT_MAC_CFM            0
  740.         #define TARGET_RT_MAC_68881            0
  741.         #define PRAGMA_IMPORT                0
  742.         #define PRAGMA_STRUCT_ALIGN            0
  743.         #define PRAGMA_ONCE                     0
  744.         #define PRAGMA_STRUCT_PACK            1
  745.         #define PRAGMA_STRUCT_PACKPUSH        1
  746.         #define PRAGMA_ENUM_PACK            0
  747.         #define PRAGMA_ENUM_ALWAYSINT        0
  748.         #define PRAGMA_ENUM_OPTIONS            0
  749.         #define FOUR_CHAR_CODE(x)            (x) 
  750.         #define TYPE_EXTENDED                0
  751.         #define TYPE_LONGLONG                0
  752.         #if defined(__cplusplus) && (_MSC_VER >= 1100)
  753.             #define TYPE_BOOL                1
  754.         #else
  755.             #define TYPE_BOOL                0
  756.         #endif
  757.  
  758.         #elif defined(_M_ALPHA)        /* Visual C++ with Dec Alpha target */
  759.         #define TARGET_CPU_PPC              0
  760.         #define TARGET_CPU_68K              0
  761.         #define TARGET_CPU_X86              0
  762.         #define TARGET_CPU_MIPS             0
  763.         #define TARGET_CPU_SPARC            0
  764.         #define TARGET_CPU_ALPHA            1
  765.         #define TARGET_OS_MAC                0
  766.         #define TARGET_OS_WIN32                1
  767.         #define TARGET_OS_UNIX                0
  768.         #define TARGET_RT_LITTLE_ENDIAN        1
  769.         #define TARGET_RT_BIG_ENDIAN        0
  770.         #define TARGET_RT_MAC_CFM            0
  771.         #define TARGET_RT_MAC_68881            0
  772.         #define PRAGMA_IMPORT                0
  773.         #define PRAGMA_STRUCT_ALIGN            0
  774.         #define PRAGMA_ONCE                     0
  775.         #define PRAGMA_STRUCT_PACK            1
  776.         #define PRAGMA_STRUCT_PACKPUSH        1
  777.         #define PRAGMA_ENUM_PACK            0
  778.         #define PRAGMA_ENUM_ALWAYSINT        0
  779.         #define PRAGMA_ENUM_OPTIONS            0
  780.         #define FOUR_CHAR_CODE(x)        (((DWORD) ((x) & 0x000000FF)) << 24) \
  781.                                     | (((DWORD) ((x) & 0x0000FF00)) << 8) \
  782.                                     | (((DWORD) ((x) & 0x00FF0000)) >> 8) \
  783.                                     | (((DWORD) ((x) & 0xFF000000)) >> 24)
  784.         #define TYPE_EXTENDED                0
  785.         #define TYPE_LONGLONG                0
  786.         #define TYPE_BOOL                    0
  787.  
  788.     #elif defined(_M_PPC)    /* Visual C++ for Windows NT on PowerPC target */
  789.         #define TARGET_CPU_PPC              1
  790.         #define TARGET_CPU_68K              0
  791.         #define TARGET_CPU_X86              0
  792.         #define TARGET_CPU_MIPS             0
  793.         #define TARGET_CPU_SPARC            0
  794.         #define TARGET_CPU_ALPHA            0
  795.         #define TARGET_OS_MAC                0
  796.         #define TARGET_OS_WIN32                1
  797.         #define TARGET_OS_UNIX                0
  798.         #define TARGET_RT_LITTLE_ENDIAN        1
  799.         #define TARGET_RT_BIG_ENDIAN        0
  800.         #define TARGET_RT_MAC_CFM            0
  801.         #define TARGET_RT_MAC_68881            0
  802.         #define PRAGMA_IMPORT                0
  803.         #define PRAGMA_STRUCT_ALIGN            0
  804.         #define PRAGMA_ONCE                     0
  805.         #define PRAGMA_STRUCT_PACK            1
  806.         #define PRAGMA_STRUCT_PACKPUSH        1
  807.         #define PRAGMA_ENUM_PACK            0
  808.         #define PRAGMA_ENUM_ALWAYSINT        0
  809.         #define PRAGMA_ENUM_OPTIONS            0
  810.         #define FOUR_CHAR_CODE(x)        (((DWORD) ((x) & 0x000000FF)) << 24) \
  811.                                     | (((DWORD) ((x) & 0x0000FF00)) << 8) \
  812.                                     | (((DWORD) ((x) & 0x00FF0000)) >> 8) \
  813.                                     | (((DWORD) ((x) & 0xFF000000)) >> 24)
  814.         #define TYPE_EXTENDED                0
  815.         #define TYPE_LONGLONG                0
  816.         #define TYPE_BOOL                    0
  817.  
  818.         #elif defined(_M_MRX000)    /* Visual C++ for Windows NT on MIPS target */
  819.         #define TARGET_CPU_PPC              0
  820.         #define TARGET_CPU_68K              0
  821.         #define TARGET_CPU_X86              0
  822.         #define TARGET_CPU_MIPS             1
  823.         #define TARGET_CPU_SPARC            0
  824.         #define TARGET_CPU_ALPHA            0
  825.         #define TARGET_OS_MAC                0
  826.         #define TARGET_OS_WIN32                1
  827.         #define TARGET_OS_UNIX                0
  828.         #define TARGET_RT_LITTLE_ENDIAN        1
  829.         #define TARGET_RT_BIG_ENDIAN        0
  830.         #define TARGET_RT_MAC_CFM            0
  831.         #define TARGET_RT_MAC_68881            0
  832.         #define PRAGMA_IMPORT                0
  833.         #define PRAGMA_STRUCT_ALIGN            0
  834.         #define PRAGMA_ONCE                     0
  835.         #define PRAGMA_STRUCT_PACK            1
  836.         #define PRAGMA_STRUCT_PACKPUSH        1
  837.         #define PRAGMA_ENUM_PACK            0
  838.         #define PRAGMA_ENUM_ALWAYSINT        0
  839.         #define PRAGMA_ENUM_OPTIONS            0
  840.         #define FOUR_CHAR_CODE(x)        (((DWORD) ((x) & 0x000000FF)) << 24) \
  841.                                     | (((DWORD) ((x) & 0x0000FF00)) << 8) \
  842.                                     | (((DWORD) ((x) & 0x00FF0000)) >> 8) \
  843.                                     | (((DWORD) ((x) & 0xFF000000)) >> 24)
  844.         #define TYPE_EXTENDED                0
  845.         #define TYPE_LONGLONG                0
  846.         #define TYPE_BOOL                    0
  847.     #endif
  848.  
  849.  
  850. #elif defined(__MOTO__)
  851.     /*
  852.         mcc from Motorola, Inc. 
  853.     */
  854.     #define TARGET_CPU_PPC              1
  855.     #define TARGET_CPU_68K              0
  856.     #define TARGET_CPU_X86              0
  857.     #define TARGET_CPU_MIPS             0
  858.     #define TARGET_CPU_SPARC            0        
  859.     #define TARGET_CPU_ALPHA            0
  860.     #define TARGET_OS_MAC                1
  861.     #define TARGET_OS_WIN32                0
  862.     #define TARGET_OS_UNIX                0
  863.     #define TARGET_RT_LITTLE_ENDIAN        0
  864.     #define TARGET_RT_BIG_ENDIAN        1
  865.     #define TARGET_RT_MAC_CFM            1
  866.     #define TARGET_RT_MAC_68881            0
  867.     #define PRAGMA_IMPORT                0            /* how is this detected ?? */
  868.     #define PRAGMA_STRUCT_ALIGN            1
  869.     #if __MOTO__ >= 40702                             /* MCC version 4.7.2 */
  870.       #define PRAGMA_ONCE                 1
  871.     #else
  872.       #define PRAGMA_ONCE                 0
  873.     #endif
  874.     #define PRAGMA_STRUCT_PACK            0
  875.     #define PRAGMA_STRUCT_PACKPUSH        0
  876.     #define PRAGMA_ENUM_PACK            0
  877.     #define PRAGMA_ENUM_ALWAYSINT        0
  878.     #define PRAGMA_ENUM_OPTIONS            0
  879.     #define FOUR_CHAR_CODE(x)            (x)
  880.     #define TYPE_LONGLONG                0            /* how is this detected ?? */
  881.     #ifdef _BOOL
  882.         #define TYPE_BOOL                1            
  883.     #else
  884.         #define TYPE_BOOL                0            
  885.     #endif
  886.     #define TYPE_EXTENDED                0
  887.  
  888.  
  889.  
  890. #elif defined(_MIPS_ISA)
  891.     /*
  892.         MIPSpro compiler from Silicon Graphics Inc.
  893.     */
  894.     #define TARGET_CPU_PPC              0
  895.     #define TARGET_CPU_68K              0
  896.     #define TARGET_CPU_X86              0
  897.     #define TARGET_CPU_MIPS             1
  898.     #define TARGET_CPU_SPARC            0        
  899.     #define TARGET_CPU_ALPHA            0
  900.     #define TARGET_OS_MAC                0
  901.     #define TARGET_OS_WIN32                0
  902.     #define TARGET_OS_UNIX                1
  903.     #define TARGET_RT_LITTLE_ENDIAN        0
  904.     #define TARGET_RT_BIG_ENDIAN        1
  905.     #define TARGET_RT_MAC_CFM            0
  906.     #define TARGET_RT_MAC_68881            0
  907.     #define PRAGMA_IMPORT                0
  908.     #define PRAGMA_STRUCT_ALIGN            0
  909.     #define PRAGMA_ONCE                    0
  910.     #define PRAGMA_STRUCT_PACK            1
  911.     #define PRAGMA_STRUCT_PACKPUSH        0
  912.     #define PRAGMA_ENUM_PACK            0
  913.     #define PRAGMA_ENUM_ALWAYSINT        0
  914.     #define PRAGMA_ENUM_OPTIONS            0
  915.     #define FOUR_CHAR_CODE(x)            (x)
  916.     #define TYPE_EXTENDED                0
  917.     #define TYPE_LONGLONG                0
  918.     #define TYPE_BOOL                    0
  919.  
  920.  
  921. #elif defined(__sparc)
  922.     /*
  923.         SPARCompiler compiler from Sun Microsystems Inc.
  924.     */
  925.     #define TARGET_CPU_PPC              0
  926.     #define TARGET_CPU_68K              0
  927.     #define TARGET_CPU_X86              0
  928.     #define TARGET_CPU_MIPS             0
  929.     #define TARGET_CPU_SPARC            1        
  930.     #define TARGET_CPU_ALPHA            0
  931.     #define TARGET_OS_MAC                0
  932.     #define TARGET_OS_WIN32                0
  933.     #define TARGET_OS_UNIX                1
  934.     #define TARGET_RT_LITTLE_ENDIAN        0
  935.     #define TARGET_RT_BIG_ENDIAN        1
  936.     #define TARGET_RT_MAC_CFM            0
  937.     #define TARGET_RT_MAC_68881            0
  938.     #define PRAGMA_IMPORT                0
  939.     #define PRAGMA_STRUCT_ALIGN            0
  940.     #define PRAGMA_ONCE                    0
  941.     #define PRAGMA_STRUCT_PACK            1
  942.     #define PRAGMA_STRUCT_PACKPUSH        0
  943.     #define PRAGMA_ENUM_PACK            0
  944.     #define PRAGMA_ENUM_ALWAYSINT        0
  945.     #define PRAGMA_ENUM_OPTIONS            0
  946.     #define FOUR_CHAR_CODE(x)        (((unsigned long) ((x) & 0x000000FF)) << 24) \
  947.                                     | (((unsigned long) ((x) & 0x0000FF00)) << 8) \
  948.                                     | (((unsigned long) ((x) & 0x00FF0000)) >> 8) \
  949.                                     | (((unsigned long) ((x) & 0xFF000000)) >> 24)
  950.     #define TYPE_EXTENDED                0
  951.     #define TYPE_LONGLONG                0
  952.     #define TYPE_BOOL                    0
  953.  
  954.  
  955. #else
  956.     /*
  957.         Unknown compiler, perhaps set up from the command line (e.g. -d TARGET_CPU_MIPS , etc.)
  958.     */
  959.     #if defined(TARGET_CPU_PPC) && TARGET_CPU_PPC
  960.         #define TARGET_CPU_68K   0
  961.         #define TARGET_CPU_X86   0
  962.         #define TARGET_CPU_MIPS  0
  963.         #define TARGET_CPU_SPARC 0
  964.         #define TARGET_CPU_ALPHA 0
  965.     #elif defined(TARGET_CPU_68K) && TARGET_CPU_68K
  966.         #define TARGET_CPU_PPC   0
  967.         #define TARGET_CPU_X86   0
  968.         #define TARGET_CPU_MIPS  0
  969.         #define TARGET_CPU_SPARC 0
  970.         #define TARGET_CPU_ALPHA 0
  971.     #elif defined(TARGET_CPU_X86) && TARGET_CPU_X86
  972.         #define TARGET_CPU_PPC   0
  973.         #define TARGET_CPU_68K   0
  974.         #define TARGET_CPU_MIPS  0
  975.         #define TARGET_CPU_SPARC 0
  976.         #define TARGET_CPU_ALPHA 0
  977.     #elif defined(TARGET_CPU_MIPS) && TARGET_CPU_MIPS
  978.         #define TARGET_CPU_PPC   0
  979.         #define TARGET_CPU_68K   0
  980.         #define TARGET_CPU_X86   0
  981.         #define TARGET_CPU_SPARC 0
  982.         #define TARGET_CPU_ALPHA 0
  983.     #elif defined(TARGET_CPU_SPARC) && TARGET_CPU_SPARC
  984.         #define TARGET_CPU_PPC   0
  985.         #define TARGET_CPU_68K   0
  986.         #define TARGET_CPU_X86   0
  987.         #define TARGET_CPU_MIPS  0
  988.         #define TARGET_CPU_ALPHA 0
  989.     #elif defined(TARGET_CPU_ALPHA) && TARGET_CPU_ALPHA
  990.         #define TARGET_CPU_PPC   0
  991.         #define TARGET_CPU_68K   0
  992.         #define TARGET_CPU_X86   0
  993.         #define TARGET_CPU_MIPS  0
  994.         #define TARGET_CPU_SPARC 0
  995.  
  996.         
  997.     #else
  998.         /*
  999.             NOTE:    If your compiler errors out here then support for your compiler 
  1000.                     has not yet been added to ConditionalMacros.h.  
  1001.                     
  1002.                     ConditionalMacros.h is designed to be plug-and-play.  It auto detects
  1003.                     which compiler is being run and configures the TARGET_ conditionals
  1004.                     appropriately.  
  1005.                     
  1006.                     The short term work around is to set the TARGET_CPU_ and TARGET_OS_
  1007.                     on the command line to the compiler (e.g. d TARGET_CPU_MIPS -d TARGET_OS_UNIX)
  1008.                     
  1009.                     The long term solution is to add a new case to this file which
  1010.                     auto detects your compiler and sets up the TARGET_ conditionals.
  1011.                     If you do this, send the changes you made to devsupport@apple.com
  1012.                     to get it integrated into the next release of ConditionalMacros.h.
  1013.         */
  1014.         #error ConditionalMacros.h: unknown compiler (see comment above)
  1015.         #define TARGET_CPU_PPC   0
  1016.         #define TARGET_CPU_68K   0
  1017.         #define TARGET_CPU_X86   0
  1018.         #define TARGET_CPU_MIPS  0
  1019.         #define TARGET_CPU_SPARC 0
  1020.         #define TARGET_CPU_ALPHA 0
  1021.     #endif
  1022.     
  1023.  
  1024.  
  1025.     #if defined(TARGET_OS_MAC) && TARGET_OS_MAC
  1026.         #define TARGET_OS_WIN32  0
  1027.         #define TARGET_OS_UNIX   0
  1028.     #elif defined(TARGET_OS_WIN32) && TARGET_OS_WIN32
  1029.         #define TARGET_OS_MAC    0
  1030.         #define TARGET_OS_UNIX   0
  1031.     #elif defined(TARGET_OS_UNIX) && TARGET_OS_UNIX
  1032.         #define TARGET_OS_MAC    0
  1033.         #define TARGET_OS_WIN32  0
  1034.     #elif TARGET_CPU_PPC || TARGET_CPU_68K
  1035.         #define TARGET_OS_MAC    1
  1036.         #define TARGET_OS_WIN32  0
  1037.         #define TARGET_OS_UNIX   0
  1038.     #else
  1039.         #error ConditionalMacros.h: unknown target OS (see comment above)
  1040.     #endif
  1041.  
  1042.     #if !defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
  1043.         #if TARGET_OS_MAC
  1044.             #define TARGET_RT_LITTLE_ENDIAN        0
  1045.             #define TARGET_RT_BIG_ENDIAN        1
  1046.         #elif TARGET_OS_WIN32
  1047.             #define TARGET_RT_LITTLE_ENDIAN        1
  1048.             #define TARGET_RT_BIG_ENDIAN        0
  1049.         #endif
  1050.     #endif
  1051.         
  1052.     #if defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
  1053.         #define TARGET_RT_LITTLE_ENDIAN        !TARGET_RT_BIG_ENDIAN
  1054.     #elif !defined(TARGET_RT_BIG_ENDIAN) && defined(TARGET_RT_LITTLE_ENDIAN)
  1055.         #define TARGET_RT_BIG_ENDIAN        !TARGET_RT_LITTLE_ENDIAN
  1056.     #endif
  1057.     
  1058.     #if !defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
  1059.         #error unknown endianess of target processor
  1060.     #endif
  1061.  
  1062.     #ifndef TARGET_RT_MAC_CFM
  1063.     #define TARGET_RT_MAC_CFM            TARGET_CPU_PPC
  1064.     #endif
  1065.     #ifndef TARGET_RT_MAC_68881
  1066.     #define TARGET_RT_MAC_68881            0
  1067.     #endif
  1068.  
  1069.         
  1070.     #ifndef PRAGMA_IMPORT
  1071.     #define PRAGMA_IMPORT                0
  1072.     #endif
  1073.     #ifndef PRAGMA_STRUCT_ALIGN
  1074.     #define PRAGMA_STRUCT_ALIGN            0
  1075.     #endif
  1076.     #ifndef PRAGMA_ONCE
  1077.     #define PRAGMA_ONCE                    0
  1078.     #endif
  1079.     #ifndef PRAGMA_STRUCT_PACK
  1080.     #define PRAGMA_STRUCT_PACK            0
  1081.     #endif
  1082.     #ifndef PRAGMA_STRUCT_PACKPUSH
  1083.     #define PRAGMA_STRUCT_PACKPUSH        0
  1084.     #endif
  1085.     #ifndef PRAGMA_ENUM_PACK
  1086.     #define PRAGMA_ENUM_PACK            0
  1087.     #endif
  1088.     #ifndef PRAGMA_ENUM_ALWAYSINT
  1089.     #define PRAGMA_ENUM_ALWAYSINT        0
  1090.     #endif
  1091.     #ifndef PRAGMA_ENUM_OPTIONS
  1092.     #define PRAGMA_ENUM_OPTIONS            0
  1093.     #endif
  1094.     #ifndef FOUR_CHAR_CODE
  1095.     #define FOUR_CHAR_CODE(x)            (x)
  1096.     #endif
  1097.  
  1098.     #ifndef TYPE_EXTENDED
  1099.     #define TYPE_EXTENDED                0
  1100.     #endif
  1101.     #ifndef TYPE_LONGLONG
  1102.     #define TYPE_LONGLONG                0
  1103.     #endif
  1104.     #ifndef TYPE_BOOL
  1105.     #define TYPE_BOOL                    0
  1106.     #endif
  1107. #endif
  1108.  
  1109.  
  1110.  
  1111.  
  1112. /****************************************************************************************************
  1113.  
  1114.     EXTERN_API≈    
  1115.     These conditionals are used to specify the calling convention of a function.
  1116.     Mac classic 68K and Win32 each have two possible calling conventions:
  1117.  
  1118.         EXTERN_API                - Classic 68K pascal, Win32 __cdecl
  1119.         EXTERN_API_C            - Classic 68K C,      Win32 __cdecl
  1120.         EXTERN_API_STDCALL        - Classic 68K pascal, Win32 __stdcall
  1121.         EXTERN_API_C_STDCALL    - Classic 68K C,      Win32 __stdcall
  1122.  
  1123.  
  1124.     CALLBACK_API≈    
  1125.     These conditionals are used to specify the calling convention of a function pointer.
  1126.     Mac classic 68K and Win32 each have two possible calling conventions:
  1127.  
  1128.         CALLBACK_API            - Classic 68K pascal, Win32 __stdcall
  1129.         CALLBACK_API_C            - Classic 68K C,      Win32 __stdcall
  1130.         CALLBACK_API_STDCALL    - Classic 68K pascal, Win32 __cdecl
  1131.         CALLBACK_API_C_STDCALL    - Classic 68K C,      Win32 __cdecl
  1132.  
  1133. ****************************************************************************************************/
  1134. #if TARGET_OS_MAC
  1135.     /*
  1136.         Mac OS
  1137.     */
  1138.     #define EXTERN_API(_type)                        extern pascal _type        /* Note: all Mac OS compilers must be able to handle the pascal keyword */
  1139.     #define EXTERN_API_C(_type)                        extern _type
  1140.     #define EXTERN_API_STDCALL(_type)                extern pascal _type
  1141.     #define EXTERN_API_C_STDCALL(_type)                extern _type
  1142.     #define CALLBACK_API(_type, _name)                pascal _type (*_name)
  1143.     #define CALLBACK_API_C(_type, _name)            _type (*_name)
  1144.     #define CALLBACK_API_STDCALL(_type, _name)        pascal _type (*_name)
  1145.     #define CALLBACK_API_C_STDCALL(_type, _name)    _type (*_name)
  1146. #elif TARGET_OS_WIN32
  1147.     /*
  1148.         Win32 
  1149.     */
  1150.     #define EXTERN_API(_type)                        _type __cdecl
  1151.     #define EXTERN_API_C(_type)                        _type __cdecl
  1152.     #define EXTERN_API_STDCALL(_type)                _type __stdcall
  1153.     #define EXTERN_API_C_STDCALL(_type)                _type __stdcall
  1154.     #define CALLBACK_API(_type, _name)                _type (__cdecl * _name)
  1155.     #define CALLBACK_API_C(_type, _name)            _type (__cdecl * _name)
  1156.     #define CALLBACK_API_STDCALL(_type, _name)        _type (__stdcall * _name)
  1157.     #define CALLBACK_API_C_STDCALL(_type, _name)    _type (__stdcall * _name)
  1158.     
  1159.     #undef pascal
  1160.     #define pascal
  1161. #else
  1162.     /*
  1163.         Unix or anything else
  1164.     */
  1165.     #define EXTERN_API(_type)                        extern _type
  1166.     #define EXTERN_API_C(_type)                        extern _type
  1167.     #define EXTERN_API_STDCALL(_type)                extern _type
  1168.     #define EXTERN_API_C_STDCALL(_type)                extern _type
  1169.     #define CALLBACK_API(_type, _name)                _type (*_name)
  1170.     #define CALLBACK_API_C(_type, _name)            _type (*_name)
  1171.     #define CALLBACK_API_STDCALL(_type, _name)        _type (*_name)
  1172.     #define CALLBACK_API_C_STDCALL(_type, _name)    _type (*_name)    
  1173.     
  1174.     #undef pascal
  1175.     #define pascal
  1176. #endif
  1177.  
  1178.  
  1179. /****************************************************************************************************
  1180.     Backward compatibility for clients expecting 2.x version on ConditionalMacros.h
  1181.  
  1182.     GENERATINGPOWERPC        - Compiler is generating PowerPC instructions
  1183.     GENERATING68K            - Compiler is generating 68k family instructions
  1184.     GENERATING68881            - Compiler is generating mc68881 floating point instructions
  1185.     GENERATINGCFM            - Code being generated assumes CFM calling conventions
  1186.     CFMSYSTEMCALLS            - No A-traps.  Systems calls are made using CFM and UPP's
  1187.     PRAGMA_ALIGN_SUPPORTED    - Compiler supports: #pragma options align=mac68k/power/reset
  1188.     PRAGMA_IMPORT_SUPPORTED    - Compiler supports: #pragma import on/off/reset
  1189.  
  1190. ****************************************************************************************************/
  1191. #if TARGET_OS_MAC
  1192. #define GENERATINGPOWERPC TARGET_CPU_PPC
  1193. #define GENERATING68K TARGET_CPU_68K
  1194. #define GENERATING68881 TARGET_RT_MAC_68881
  1195. #define GENERATINGCFM TARGET_RT_MAC_CFM
  1196. #define CFMSYSTEMCALLS TARGET_RT_MAC_CFM
  1197. #define PRAGMA_ALIGN_SUPPORTED    PRAGMA_STRUCT_ALIGN
  1198. #define PRAGMA_IMPORT_SUPPORTED PRAGMA_IMPORT
  1199. /*
  1200.     NOTE: The FOR_≈ conditionals were developed to produce integerated
  1201.           interface files for System 7 and Copland.  Now that Copland
  1202.           is canceled, all FOR_ conditionals have been removed from
  1203.           the interface files.  But, just in case you someone got an 
  1204.           interface file that uses them, the following sets the FOR_≈
  1205.           conditionals to a consistent, usable state.
  1206.  
  1207.     #define FOR_OPAQUE_SYSTEM_DATA_STRUCTURES        0
  1208.     #ifndef FOR_PTR_BASED_AE
  1209.         #define FOR_PTR_BASED_AE                    0
  1210.     #endif
  1211.     #define FOR_SYSTEM7_ONLY                        1
  1212.     #define FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED        1
  1213.     #define FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE        1
  1214.     #define FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE        1
  1215.     #define FOR_SYSTEM8_COOPERATIVE                    0
  1216.     #define FOR_SYSTEM8_PREEMPTIVE                    0
  1217. */
  1218. #define FOR_OPAQUE_SYSTEM_DATA_STRUCTURES     ..FOR_OPAQUE_SYSTEM_DATA_STRUCTURES_is_an_obsolete_Coplandism..
  1219. #define FOR_PTR_BASED_AE                     ..FOR_PTR_BASED_AE_is_an_obsolete_Coplandism..
  1220. #define FOR_SYSTEM7_ONLY                     ..FOR_SYSTEM7_ONLY_is_an_obsolete_Coplandism..
  1221. #define FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED     ..FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED_is_an_obsolete_Coplandism..
  1222. #define FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE ..FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE_is_an_obsolete_Coplandism..
  1223. #define FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE    ..FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE_is_an_obsolete_Coplandism..
  1224. #define FOR_SYSTEM8_COOPERATIVE             ..FOR_SYSTEM8_COOPERATIVE_is_an_obsolete_Coplandism..
  1225. #define FOR_SYSTEM8_PREEMPTIVE                 ..FOR_SYSTEM8_PREEMPTIVE_is_an_obsolete_Coplandism..
  1226. #endif  /* TARGET_OS_MAC */
  1227.  
  1228.  
  1229.  
  1230.  
  1231. /****************************************************************************************************
  1232.  
  1233.     OLDROUTINENAMES            - "Old" names for Macintosh system calls are allowed in source code.
  1234.                               (e.g. DisposPtr instead of DisposePtr). The names of system routine
  1235.                               are now more sensitive to change because CFM binds by name.  In the 
  1236.                               past, system routine names were compiled out to just an A-Trap.  
  1237.                               Macros have been added that each map an old name to its new name.  
  1238.                               This allows old routine names to be used in existing source files,
  1239.                               but the macros only work if OLDROUTINENAMES is true.  This support
  1240.                               will be removed in the near future.  Thus, all source code should 
  1241.                               be changed to use the new names! You can set OLDROUTINENAMES to false
  1242.                               to see if your code has any old names left in it.
  1243.     
  1244.     OLDROUTINELOCATIONS     - "Old" location of Macintosh system calls are used.  For example, c2pstr 
  1245.                               has been moved from Strings to TextUtils.  It is conditionalized in
  1246.                               Strings with OLDROUTINELOCATIONS and in TextUtils with !OLDROUTINELOCATIONS.
  1247.                               This allows developers to upgrade to newer interface files without 
  1248.                               having to change the includes in their source code.  But, it allows
  1249.                               the slow migration of system calls to more understandable file locations.  
  1250.                               OLDROUTINELOCATIONS currently defaults to true, but eventually will 
  1251.                               default to false.
  1252.  
  1253. ****************************************************************************************************/
  1254. #ifndef OLDROUTINENAMES
  1255. #define OLDROUTINENAMES 0
  1256. #endif  /*  ! defined(OLDROUTINENAMES)  */
  1257.  
  1258. #ifndef OLDROUTINELOCATIONS
  1259. #define OLDROUTINELOCATIONS 0
  1260. #endif  /*  ! defined(OLDROUTINELOCATIONS)  */
  1261.  
  1262.  
  1263.  
  1264. /****************************************************************************************************
  1265.     C specific conditionals
  1266.  
  1267.     CGLUESUPPORTED            - Interface library will support "C glue" functions (function names
  1268.                               are: all lowercase, use C strings instead of pascal strings, use 
  1269.                               Point* instead of Point).
  1270.  
  1271. ****************************************************************************************************/
  1272. #ifndef CGLUESUPPORTED
  1273. #if TARGET_OS_MAC && !defined(THINK_C)
  1274. #define CGLUESUPPORTED 1
  1275. #else
  1276. #define CGLUESUPPORTED 0
  1277. #endif  /* TARGET_OS_MAC &&  ! defined(THINK_C)  */
  1278.  
  1279. #endif  /*  ! defined(CGLUESUPPORTED)  */
  1280.  
  1281.  
  1282.  
  1283. /****************************************************************************************************
  1284.     The following macros isolate the use of 68K inlines in function prototypes.
  1285.     On the Mac OS under the Classic 68K runtime, function prototypes were followed
  1286.     by a list of 68K opcodes which the compiler inserted in the generated code instead
  1287.     of a JSR.  Under Classic 68K on the Mac OS, this macro will put the opcodes
  1288.     in the right syntax.  For all other OS's and runtimes the macro suppress the opcodes.
  1289.     Example:
  1290.     
  1291.         EXTERN_P void DrawPicture(PicHandle myPicture, const Rect *dstRect)
  1292.              ONEWORDINLINE(0xA8F6);
  1293.     
  1294. ****************************************************************************************************/
  1295.  
  1296. #if TARGET_OS_MAC && !TARGET_RT_MAC_CFM
  1297.     #define ONEWORDINLINE(w1) = w1
  1298.     #define TWOWORDINLINE(w1,w2) = {w1,w2}
  1299.     #define THREEWORDINLINE(w1,w2,w3) = {w1,w2,w3}
  1300.     #define FOURWORDINLINE(w1,w2,w3,w4)  = {w1,w2,w3,w4}
  1301.     #define FIVEWORDINLINE(w1,w2,w3,w4,w5) = {w1,w2,w3,w4,w5}
  1302.     #define SIXWORDINLINE(w1,w2,w3,w4,w5,w6)     = {w1,w2,w3,w4,w5,w6}
  1303.     #define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7)      = {w1,w2,w3,w4,w5,w6,w7}
  1304.     #define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8)      = {w1,w2,w3,w4,w5,w6,w7,w8}
  1305.     #define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9)      = {w1,w2,w3,w4,w5,w6,w7,w8,w9}
  1306.     #define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10)  = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10}
  1307.     #define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11)      = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11}
  1308.     #define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12)      = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12}
  1309. #else
  1310.     #define ONEWORDINLINE(w1)
  1311.     #define TWOWORDINLINE(w1,w2)
  1312.     #define THREEWORDINLINE(w1,w2,w3)
  1313.     #define FOURWORDINLINE(w1,w2,w3,w4)
  1314.     #define FIVEWORDINLINE(w1,w2,w3,w4,w5)
  1315.     #define SIXWORDINLINE(w1,w2,w3,w4,w5,w6)
  1316.     #define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7)
  1317.     #define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8)
  1318.     #define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9)
  1319.     #define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10)
  1320.     #define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11)
  1321.     #define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12)
  1322. #endif
  1323.  
  1324.  
  1325. #define OSTypeConst        FOUR_CHAR_CODE
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331. #endif /* __CONDITIONALMACROS__ */
  1332.  
  1333.